# # tODO 列表推导式
# # # 　语法：［表达式 for 变量 in 可迭代对象］
# # 需求: 生成一个1-10的列表
# li1=[a for a in range(1,11)]
# print(li1)
#
# # 需求: 1-10 列表里面元素的立方
# li2=[a**3 for a in range(1,11)]
# print(li2)
# #字符串
# li3=['abc'+ 'ABC' for a in range(1,11)]
# print(li3)
# li4=['abc'+ str(a) for a in range(1,11)]
# print(li4)


#1-100的奇数 x%2!=0
# li5=[a for a in range(1,101) if a % 2!=0]
# print(li5)
#
# #1-100的偶数x%2=0
# li6=[i for i in range(1,101) if i% 2==0]
# print(li6)

#运用多判断语句for
list6 = [(i, j) for i in range(1, 3) for j in range(1, 3)]
print(list6)

list7 = [(i, j) for i in range(1, 4) for j in range(1, 4)]
print(list7)